package com.healthy.support.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.support.mapper.MessagesMapper;
import com.healthy.support.domain.Messages;
import com.healthy.support.service.IMessagesService;

/**
 * 聊天内容Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class MessagesServiceImpl implements IMessagesService 
{
    @Autowired
    private MessagesMapper messagesMapper;

    /**
     * 查询聊天内容
     * 
     * @param messageId 聊天内容主键
     * @return 聊天内容
     */
    @Override
    public Messages selectMessagesByMessageId(Long messageId)
    {
        return messagesMapper.selectMessagesByMessageId(messageId);
    }

    /**
     * 查询聊天内容列表
     * 
     * @param messages 聊天内容
     * @return 聊天内容
     */
    @Override
    public List<Messages> selectMessagesList(Messages messages)
    {
        return messagesMapper.selectMessagesList(messages);
    }

    /**
     * 新增聊天内容
     * 
     * @param messages 聊天内容
     * @return 结果
     */
    @Override
    public int insertMessages(Messages messages)
    {
        return messagesMapper.insertMessages(messages);
    }

    /**
     * 修改聊天内容
     * 
     * @param messages 聊天内容
     * @return 结果
     */
    @Override
    public int updateMessages(Messages messages)
    {
        return messagesMapper.updateMessages(messages);
    }

    /**
     * 批量删除聊天内容
     * 
     * @param messageIds 需要删除的聊天内容主键
     * @return 结果
     */
    @Override
    public int deleteMessagesByMessageIds(Long[] messageIds)
    {
        return messagesMapper.deleteMessagesByMessageIds(messageIds);
    }

    /**
     * 删除聊天内容信息
     * 
     * @param messageId 聊天内容主键
     * @return 结果
     */
    @Override
    public int deleteMessagesByMessageId(Long messageId)
    {
        return messagesMapper.deleteMessagesByMessageId(messageId);
    }
}
